package com.csht.service;

import java.util.Map;

import com.csht.model.CshtNotice;
import com.csht.page.PagerModel;

public interface CshtNoticeService {
	
	/**
	 * 根据用户id查询未读消息数量
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public Integer getNoticeNumberByUserId(Integer userId) throws Exception;
	
	/**
	 * 根据用户id查询所有消息数量
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public Integer getNoticeTotalByUserId(Integer userId) throws Exception;
	
	/**
	 * 根据用户id、偏移量、每页总数查询消息通知
	 * @param res
	 * @return
	 * @throws Exception
	 */
	public PagerModel<CshtNotice> getNoticeByUserId(Map<String, Integer> res) throws Exception;
	
	/**
	 * 根据消息通知id查询消息
	 * @param noticeId
	 * @return
	 * @throws Exception
	 */
	public CshtNotice getNoticeById(Integer noticeId) throws Exception;
	
	/**
	 * 根据消息通知id更新已读
	 * @param noticeId
	 * @throws Exception
	 */
	public void updateNoticeIsReadyById(Integer noticeId) throws Exception;
	
	/**
	 * 插入记录
	 * @param cshtNotice
	 * @throws Exception
	 */
	public void insertNotice(CshtNotice cshtNotice) throws Exception;

}
